// ccrtti_eh_tests.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "ccrtrtti_defs.h"

namespace ccrtrtti
{


	void dump_progress()
	{
		for( progress_vector_t::const_iterator
				it = progress_vector.begin(); it != progress_vector.end(); ++it )
		{
			char const * type = it->type == progress_info_t::constructor ? "ctor" : "dtor";
			if( it->inheritance_level < 20 )
				for( int i=0; i<it->inheritance_level ; ++i)
					printf(" ");
			printf( "%d %s %s\n", it->inheritance_level 
							, it->type_descriptor->raw_name()
							, type
						);
		}

		printf( "Unwind info:\n");
		for( unwind_map_t::const_iterator 
			itu = unwind_map.begin(); itu != unwind_map.end(); ++itu )
		{
			unwind_info_t const & info = itu->second;
			printf( " t[%x] b[%x] c[%d] d[%d]\n"
				, info.this_object
				, info.onwing_base_object
				, info.constructed
				, info.destructed);
		}
	}

	namespace test_1
	{
		void test();
	}
}
#ifdef UNDER_CE

int WINAPI WinMain(	HINSTANCE hInstance,
					HINSTANCE hPrevInstance,
					LPTSTR    lpCmdLine,
					int       nCmdShow)
#else
int _tmain(int argc, _TCHAR* argv[])
#endif
{

	ccrtrtti::test_1::test();

	return 0;
}
